using BuildBox.Core.Extensions;
using BuildBox.Core.Server.Adapters;

namespace BuildBox.Core.Server.Requests
{
    public class ImageRequestHandler : RequestHandlerBase
    {
        public override void Respond(IHttpListenerContextAdapter context)
        {
            // TODO: Replace this with a generic handler.
            var segments = context.Request.Url.Segments;
            context.Response.WriteFile(@"Assets\Images\{0}".FormatWith(segments[segments.Length - 1]), ContentType.TextCss);
        }
    }
}